import request from '@/utils/request'

// 查询部署管理列表
export function listDeploy(query) {
  return request({
    url: '/workflow/deploy/list',
    method: 'get',
    params: query
  })
}

// 查询部署管理详细
export function getDeploy(categoryId) {
  return request({
    url: '/workflow/deploy/' + categoryId,
    method: 'get'
  })
}

// 新增部署管理
export function addDeploy(data) {
  return request({
    url: '/workflow/deploy',
    method: 'post',
    data: data
  })
}

// 修改部署管理
export function updateDeploy(data) {
  return request({
    url: '/workflow/deploy',
    method: 'put',
    data: data
  })
}

// 删除部署管理
export function delDeploy(categoryId) {
  return request({
    url: '/workflow/deploy/' + categoryId,
    method: 'delete'
  })
}

export function listPublish(query) {
  return request({
    url: '/workflow/deploy/publishList',
    method: 'get',
    params: query
  })
}

// 修改流程状态
export function changeState(params) {
  return request({
    url: '/workflow/deploy/changeState',
    method: 'put',
    params: params
  })
}
// 修改流程状态
export function getBpmnXml(params) {
  return request({
    url: '/workflow/deploy/bpmnXml/'+params,
    method: 'get',
  })
}




